Skip to main content
Version: 5.x.x

SocketAdapterType


import { SocketAdapterType } from "@hyper-fetch/sockets"

Description

Defined in adapter/adapter.types.ts:12

Preview

type SocketAdapterType<AdapterOptions,AdapterExtra,ListenerOptions,EmitterOptions> = (socket: Socket<SocketAdapterType<AdapterOptions, AdapterExtra, ListenerOptions, EmitterOptions>>, DO_NOT_USE?: { adapterExtra?: AdapterExtra; adapterOptions?: AdapterOptions; emitterOptions?: EmitterOptions; listenerOptions?: ListenerOptions }) => { connect: () => void; connecting: boolean; disconnect: () => void; emit: (eventMessageId: string, emitter: EmitterInstance, ack?: EmitterAcknowledgeType<any, SocketAdapterType<AdapterOptions, AdapterExtra, ListenerOptions, EmitterOptions>>) => void; listen: (listener: Listener<any, any, SocketAdapterType<AdapterOptions, AdapterExtra, ListenerOptions, EmitterOptions>>, callback: ListenerCallbackType<SocketAdapterType<AdapterOptions, AdapterExtra, ListenerOptions, EmitterOptions>, any>) => RemoveListenerCallbackType; listeners: Map<string, Map<ListenerCallbackType<SocketAdapterInstance, any>, VoidFunction>>; open: boolean; reconnect: () => void; reconnectionAttempts: number; removeListener: (endpoint: string, callback: (...args: any) => void) => void };

Structure

(socket: Socket<SocketAdapterType<AdapterOptions, AdapterExtra, ListenerOptions, EmitterOptions>>, DO_NOT_USE?: [object Object]) => [object Object]